package br.com.lh.urabuilder.util
{
	import br.com.lh.urabuilder.domain.xml.ConditionalAction;
	import br.com.lh.urabuilder.domain.xml.DigitPromptAction;
	import br.com.lh.urabuilder.domain.xml.PlaySoundAction;
	import br.com.lh.urabuilder.domain.xml.RedirectAction;
	import br.com.lh.urabuilder.domain.xml.SayTextAction;
	import br.com.lh.urabuilder.domain.xml.WSAction;
	
	import mx.controls.Image;
	
	public class ActionFactory
	{
		public function ActionFactory(){
		}
		
		public static function getAction(type:String) :Object{
			var actionImageObject:Object = new Object();
			var imgSource:String;
			if (type == "DigitPrompt"){
				actionImageObject.action = new DigitPromptAction();
				actionImageObject.imgSource = "icons/ux/1terminal.gif";
			}else if (type == "Conditional"){
				 actionImageObject.action = new ConditionalAction();
				actionImageObject.imgSource = "icons/ux/1programacao.gif";
			}else if (type == "PlaySound"){
				actionImageObject.action = new PlaySoundAction();
				actionImageObject.imgSource = "icons/ux/1gravacao.gif";
			}else if (type == "Redirect"){
				actionImageObject.action = new RedirectAction();
				actionImageObject.imgSource = "icons/ux/1redirect.gif";
			}else if (type == "WebService"){
				actionImageObject.action = new WSAction();
				actionImageObject.imgSource = "icons/ux/1webservice.gif";
			}else if (type == "SayText"){
				 actionImageObject.action = new SayTextAction();
				actionImageObject.imgSource = "icons/ux/1saytext.gif";
			}
			return actionImageObject;
		}
			
		

	}
}